function request(data) {
	let requestObj = {
		url: '',
		data: {},
		method: 'POST',
		header: 'application/json',
		//header: 'multipart/form-data',
		showLoding: false
	}
	requestObj = Object.assign(requestObj, data)
	var token = uni.getStorageSync('LOGIN_TOKEN_KEY');
	if (token != "") {
		token = "Bearer " + token;
	}
	if (requestObj.showLoding) {
		uni.showLoading({
			title: '加载中'
		});
	};
	return new Promise(function(resolve, reject) {
		uni.request({
			url: 'https://kefu.juhuilm.cn/api/' + requestObj.url,
			data: requestObj.data,
			method: requestObj.method,
			header: {
				'Content-Type': requestObj.header,
				// 'Accept': requestObj.header,
				//'token':token
				'Authorization': token
			},
			success: function(res) {
				//console.log(res,"===res====res===");
				uni.hideLoading();

				if (res.data.code == 200) {
					resolve(res.data);
				} else if (res.statusCode == 500 && res.data.message == "需要登录!") {
					uni.reLaunch({
						url: '/pages/login/index',
					});
					uni.removeStorageSync('LOGIN_TOKEN_KEY');
				} else {
					resolve(res.data);
				}
			},
			fail: function(err) {
				console.log(err)
				uni.showModal({
					title: '提示',
					content: err,
					showCancel: false,
				})
			}
		})
	});
}
export default request